<?php

namespace MyBlog\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

class Manager extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract {
    use Authenticatable, Authorizable, CanResetPassword;

    protected $fillable = [
        'name', 'password', 'remember_token',
    ];
    protected $guarded = array('id');

    public function managerLogs() {
        return $this->hasMany('MyBlog\Models\Manager');
    }
    
    public function avatarUrl() {
    	
    }

    public static $rules = [
        'name' => 'required',
        'password' => 'required',
    ];

    public static $msgs = [
        'name.required' => '请输入用户名',
        'password.required' => '请输入密码',
    ];
}
